home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / WINDOWS / RX11.ARJ / RX.DOC < prev    next >
Text File  |  1991-09-30  |  11KB  |  230 lines

  1.               RX - a reverse Windows(tm)3.0 resource-compiler
  2.                           (resource extractor)
  3.                    (c) Copyright Andreas Gruen 1991
  4.  
  5.                                                        September 30, 1991
  6. -------------------------------------------------------------------------
  7. NOTE:
  8. This is a completly experimental program in it's pre-beta version.
  9. It is not guaranteed to work properly under all circumstances, although
  10. it has been tested for a couple of weeks. Everyone who uses this program
  11. does this on his own risk, so if your machine explodes, don't tell me
  12. you didn't know.
  13.  
  14. Andreas Gruen releases this software "as is", with no express or
  15. implied warranty, including, but not limited to, the implied warranties
  16. of merchantability and fitness for a particular purpose.
  17.  
  18. This program is completly free for everyone.
  19. You can do with it and its sources whatever you want, but it would
  20. be fine to leave my name somewhere in the program or startup-banner.
  21. -------------------------------------------------------------------------
  22.  
  23. It's assumed that the reader is somewhat familiar with Windows(tm)-
  24. Resources, i.e. Icons, Bitmaps, Dialogboxes, Menus etc.
  25.  
  26. What's RX
  27. =========
  28.  
  29. RX is the complement to the Rescource-complier RC shipped with
  30. the SDK. It extracts resources from an compiled files into a
  31. form that is readable and re-processable by RC. This means
  32. that you may easily change menus, dialog-boxes or the icon(s) of
  33. a progam and recompile it, without having the source-code, although
  34. this is not the intended purpose. If you do it, please note the
  35. copyright terms of the program you process.
  36.  
  37. You may better use RX to extract for example icons from an
  38. icon-library to have them in a form you can import into other
  39. programs or work on them with an icon-editor.
  40. Or you want to create fonts, but not from the scratch.
  41. Or you want to see the authors of a programm (often included in
  42. STRINGTABLEs)  or,or,or.
  43.  
  44. Please note: RX is like RC not a Windows(tm)-Program but runs under
  45.              DOS (or in the DOS-Box). If enough people find RX useful,
  46.              I may think about a Win-Version.
  47.              For recompiling you will need a resource-compiler
  48.              compatible with Microsoft(R)'s RC.
  49.  
  50. For insiders: RX supports all resources, except User-Defined resources,
  51.               with all possible extentions (mem-options,load-options...).
  52.               There are restrictions for STRINGTABLEs (see below)
  53.               and icons and cursors that contain multiple images
  54.               (see below).
  55.               Because of this a recompiled file may differ from the
  56.               original file although no changes were made. This may
  57.               probably lead to difficulties in running the new program.
  58.               (I haven't seen any).
  59.  
  60.  
  61. How to use RX
  62. =============
  63.  
  64. Run RX with the following command-line:
  65.  
  66.   RX -options inputfile [outputname]
  67.  
  68. options   : are the view/extract options listed below.
  69.  
  70. inputfile : contains the name of the file to be processed.
  71.             You may specify an extension like .EXE,.DLL,.DRV,.FON,
  72.             the default extension is .EXE
  73.             It may contain a full pathname.
  74.             The file must be a valid Windows(tm)3.0 file (Library or
  75.             executable) otherwise RX will fail.
  76. outputname: (optional)
  77.             secifies the (base-)name of the files that will be extracted.
  78.             It should not contain an extension or a full path, although
  79.             it will work (extensions are stripped, the path will only
  80.             work for the .RC file).
  81.             If an extract option is specified, RX will at least create
  82.             a file 'outputname.RC', otherwise (only view option)
  83.             the name is ignored.
  84.  
  85. options:    valid opitons are: i b c m d s f a r n x v
  86.             (*nix-geetings) and may be combined (i.e. -i -v and -iv are
  87.             equivalent).
  88.  
  89. -i        : extract all ICONs contained in the inputfile
  90.             a 'name ICON ICONxxx.ICO' or 'number ICON ICONxxx.ICO'
  91.             is appended to the RC-file, where xxx is a decimal integer.
  92.             The name-statement will be used in the case the ICON has
  93.             an assigned name stored in the inputfile. Otherwise the
  94.             ordinal number will be used.
  95.             The extracted icons are stored in separate files named
  96.             ICONxxx.ICO.
  97.             xxx is a decimal number that counts the extracted icons.
  98.             NOTE: Icons that contain multiple (n) images are extracted
  99.             to n .ICO-files. This usually leads to a larger recompiled
  100.             executable and may lead to difficulties in running the new
  101.             program.
  102.             The format of the ICON-Files is the standard-icon format
  103.             to use with any icon-editor.
  104.  
  105. -b        : extract all BITMAPs contained in the inputfile
  106.             a 'name BITMAP BITMxxx.BMP' or 'number BITMAP BITMxxx.BMP'
  107.             is appended to the RC-file, where xxx is a decimal integer.
  108.             The name-statement will be used in the case the BITMAP has
  109.             an assigned name stored in the inputfile. Otherwise the
  110.             ordinal number will be used.
  111.             The extracted BITMAPs are stored in separate files named
  112.             BITMxxx.BMP.
  113.             xxx is a decimal number that counts the extracted BITMAPs.
  114.             The format of the BITMAP-Files is the standard-BITMAP
  115.             (BMP) format.
  116.  
  117. -c        : extract all CURSORs contained in the inputfile
  118.             a 'name CURSOR CURSxxx.ICO' or 'number CURSOR CURSxxx.CUR'
  119.             is appended to the RC-file, where xxx is a decimal integer.
  120.             The name-statement will be used in the case the CURSOR has
  121.             an assigned name stored in the inputfile. Otherwise the
  122.             ordinal number will be used.
  123.             The extracted CURSORs are stored in separate files named
  124.             CURSxxx.CUR.
  125.             xxx is a decimal number that counts the extracted CURSORs.
  126.             NOTE: CURSORs that contain multiple (n) images are extracted
  127.             to n .CUR-files. This usually leads to a larger recompiled
  128.             executable and may lead to difficulties in running the new
  129.             program.
  130.             The format of the CURSOR-Files is the standard-CURSOR format.
  131.  
  132. -m        : extract all MENUs contained in the inputfile.
  133.             All MENUs are stored in a file named outputname.MEN
  134.             and a '#include "outputname.MEN"' statement is appended
  135.             to the RC-file.
  136.             Within the .MEN-file a name-statement will be used in the
  137.             case the MENU has an assigned name stored in the inputfile.
  138.             Otherwise the ordinal number will be used.
  139.  
  140.  
  141. -d        : extract all DIALOGs contained in the inputfile.
  142.             All DIALOGs are stored in a file named outputname.DLG
  143.             and a '#include "outputname.DLG"' statement is appended
  144.             to the RC-file.
  145.             Within the .DLG-file a name-statement will be used in the
  146.             case the DIALOG has an assigned name stored in the inputfile.
  147.             Otherwise the ordinal number will be used.
  148.  
  149.  
  150. -s        : extract all STRINGTABLEs contained in the inputfile.
  151.             All STRINGTABLEs are stored in a file named outputname.STR
  152.             and a '#include "outputname.STR"' statement is appended
  153.             to the RC-file.
  154.             For insiders:
  155.             Although it is not documented the Resorce-Compiler allows
  156.             named and numbered STRINGTABLEs. This is currently not
  157.             supported by RX. The string-numbers are computed using
  158.             the method described in [2].
  159.  
  160. -f        : extract all FONTs contained in the inputfile,
  161.             'number FONT FONTxxx.FNT' (FONTS must not have names)
  162.             is appended to the RC-file, where xxx is a decimal integer
  163.             and number is the ordinal number of the font.
  164.             The extracted FONTs are stored in separate files named
  165.             FONTxxx.FNT.
  166.             xxx is a decimal number that counts the extracted FONTs.
  167.             The format of the FONT-Files is the standard-FONT (FNT)
  168.             format.
  169.  
  170. -a        : extract all ACCELERATORs contained in the inputfile.
  171.             All ACCELERATORs are stored in a file named outputname.ACC
  172.             and a '#include "outputname.ACC"' statement is appended
  173.             to the RC-file.
  174.             Within the .ACC-file a name-statement will be used in the
  175.             case the ACCELERATOR has an assigned name stored in the inputfile.
  176.             Otherwise the ordinal number will be used.
  177.             ACCELERATORS are fully supported.
  178.  
  179. -r        : extract all RCDATAs contained in the inputfile.
  180.             All RCDATAs are stored in a file named outputname.RCD
  181.             and a '#include "outputname.RCD"' statement is appended
  182.             to the RC-file.
  183.             Within the .RCD-file a name-statement will be used in the
  184.             case the RCDATA has an assigned name stored in the inputfile.
  185.             Otherwise the ordinal number will be used.
  186.             NOTE: Because I found no bytes that describe the real length
  187.                   of the RCDATA I had to use the segment size.
  188.                   This leads usually to RCDATA statement filled up
  189.                   with trailing zeroes. It doesn't look nice, but
  190.                   it doesn't affect the recompiled file.
  191.                   Whenever the RCDATA is printable, strings will be
  192.                   used to compact the RCDATA-file.
  193.  
  194. -n        : extract the nametable contained in the inputfile.
  195.             This is not necessary to recompile, but may be
  196.             useful. In the nametable-file every resource that
  197.             has a name is listed with its ordinal number.
  198.             The nametable (not the file) is internally used
  199.             to create name-statements. The nametable is
  200.             not documented (as far as I know).
  201.             Nothing is appended to the .RC-file.
  202.  
  203.  
  204. -x        : extract everything contained in the inputfile.
  205.             same as -ibcmdsfarn
  206.  
  207. -v        : verbose mode: additionally informations about
  208.             every resource are printed. Only useful for
  209.             those who are familiar with the extended executable
  210.             file-format.
  211. -?, -h    : help : prints short usage-description
  212.             also printed when RX is run without arguments.
  213.  
  214.  
  215. Try it to learn more.
  216.  
  217. Thanks to Brigitte for letting me sit behind the screen instead of doing
  218. housework for these days and for the beer and pizza.
  219.  
  220.  
  221.  
  222. Lit & Refs:
  223. ==========
  224.  
  225. [1]         Microsoft Windows Software Development Kit (SDK)
  226.             Reference - Volume 1
  227. [2]         Microsoft Windows Software Development Kit (SDK)
  228.             Reference - Volume 2
  229.             especially: Section: The Resource-Compiler
  230.